package com.cct.digitalarchapi.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cct.digitalarchapi.pojo.DigitalArchMain;
import com.cct.digitalarchapi.pojo.StaffList;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface StaffListMapper  extends BaseMapper<StaffList> {

    String qryHaveUser(@Param("staffCode") String staffCode);

    StaffList qryUser(@Param("staffCode") String staffCode);

    void addUser(StaffList staffList);

    void deleteUser(@Param("staffId") int staffId);

    IPage<StaffList> qryUserByDept( IPage<StaffList> page,@Param("archDeptCode") String archDeptCode,
                                    @Param("staffName") String staffName,@Param("staffCode") String staffCode);

    void  updatePasswd(@Param("staffCode") String staffCode,@Param("passwd") String passwd);

    void  updateUser(StaffList staffList);

    void updateManage(@Param("staffId") int staffId,@Param("archDeptName") String archDeptName);

    StaffList getLastStaff();

    int getStaffIdByCode(@Param("staffCode") String staffCode);

    void clearManage(@Param("archDeptName") String archDeptName);

    String qryHaveRoleUser(@Param("roleId") int roleId);
}
